# $Id: PKGBUILD 171313 2012-11-17 05:10:53Z allan $
# Maintainer: Thomas Bächler <thomas@archlinux.org>

pkgname=amd-ucode
_realver=2012-09-10
pkgver=${_realver//-/\.}
pkgrel=2
pkgdesc="Microcode update files for AMD family 10h, 11h, 14h and 15h CPUs"
arch=('any')
license=('custom')
url="http://www.amd64.org/support/microcode.html"
source=(http://www.amd64.org/pub/microcode/amd-ucode-${_realver}.tar
        http://www.amd64.org/pub/microcode/amd-ucode-${_realver}.tar.asc)
sha256sums=('21845c6cafa99704cdf4862b55e899ca88ed432d57f4d09ad6a5c3d2e186b718'
            'bd101b87b53394ce8f78da2588fdf91453b20931ce1b852f67a610cb9c63c73d')

package() {
  cd "${srcdir}"/${pkgname}-${_realver}
  install -D -m644 microcode_amd.bin "${pkgdir}"/usr/lib/firmware/amd-ucode/microcode_amd.bin
  install -D -m644 microcode_amd_fam15h.bin "${pkgdir}"/usr/lib/firmware/amd-ucode/microcode_amd_fam15h.bin
  install -D -m644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
